<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>蔡家短信后台管理系统</title>
    <meta name="author" content="">
    <link href="/workflow/resource/css/login.css" rel="stylesheet" type="text/css">
    <link href="/workflow/resource/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="/workflow/resource/js/plugins/layer/skin/layer.css" rel="stylesheet">
    
    <script src="/workflow/resource/js/jquery.min.js"></script>
    <script src="/workflow/resource/js/plugins/layer/layer.js" type="text/javascript"></script>
    <script type="text/javascript" src="/workflow/resource/js/Particleground.js"></script>
    
    <style type="text/css">html,body{height: 100%;position: relative;}</style>
    <script language="JavaScript">
       
        if(top!=self)
            if(self!=top) top.location=self.location;
        //-->
    </script>

    <script>
        $(document).ready(function() {
            $('body').particleground({
                dotColor: 'rgba(255,255,255,0.2)',
                lineColor: 'rgba(255,255,255,0.2)'
            });
        });
    </script>

</head>
<body id="canvas">
<canvas class="pg-canvas" width="1366" height="588"></canvas>
<div class="admin_login" style="height:286px !important;">

        <div class="admin_title">
            <strong>蔡家短信平台后台</strong>
            <em>note Management System</em>
        </div>
        <div class="admin_user">
            <input type="text" name="username" placeholder="账号名称" class="login_txt" id="username" >
        </div>
        <div class="admin_pwd">
            <input type="password" name="password" placeholder="密码" class="login_txt" id="password">
        </div>
        <div class="admin_sub">
            <input type="submit" value="立即登陆" class="submit_btn">
        </div>
</div>
<script type="text/javascript" src="/workflow/resource/js/common.js"></script>
<script>
  $(function(){
	  console.log(getRootPath());
  	$(':submit').on('click',function(){
    	var user=$("#username").val();
		var pass=$("#password").val();
		$.ajax({
			  type: 'POST',
			  url: '/workflow/userManager/userlogin',
			  data: {userName:user,password:pass},
			  dataType:'json',
			  success: function(data){
				  if(data.success){
			  		 window.location.href="/workflow/thingManager/manage"
				  }else{
				    layer.msg(data.message);
				  }
			  }
		});
    });
  });
</script>
</body>
</html>